package school.valon.persistence.pojo;

import java.io.Serializable;

import javax.persistence.*;

import java.util.Date;
import java.util.List;


/**
 * The persistent class for the survey_question database table.
 * 
 */
@Entity
@Table(name="survey_question")
@NamedQueries({
@NamedQuery(name="SurveyQuestion.findAll", query="SELECT s FROM SurveyQuestion s"),
@NamedQuery(name="SurveyQuestion.deleteById", query="DELETE FROM SurveyQuestion WHERE surveyQuestionId = :P1")
})
public class SurveyQuestion implements Serializable {

	private static final long serialVersionUID = -2771278151457189431L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="survey_question_id")
	private Integer surveyQuestionId;

	@Temporal(TemporalType.DATE)
	@Column(name="created_on")
	private Date createdOn;

	@Column(name="end_date")
	private Date endDate;

	@Temporal(TemporalType.DATE)
	@Column(name="start_date")
	private Date startDate;

	@Column(name="survey_question_name")
	private String surveyQuestionName;
	@Column(name="survey_question_text")
	private String surveyQuestionText;

	//bi-directional many-to-one association to SurveyAnswer
	@OneToMany(mappedBy="surveyQuestion", fetch=FetchType.LAZY)
	private List<SurveyAnswer> surveyAnswers;

	//bi-directional many-to-one association to Staff
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="created_by_staff_id")
	private Staff staff;

	public Integer getSurveyQuestionId() {
		return this.surveyQuestionId;
	}

	public void setSurveyQuestionId(Integer surveyQuestionId) {
		this.surveyQuestionId = surveyQuestionId;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public String getSurveyQuestionName() {
		return this.surveyQuestionName;
	}

	public void setSurveyQuestionName(String surveyQuestionName) {
		this.surveyQuestionName = surveyQuestionName;
	}

	public String getSurveyQuestionText() {
		return surveyQuestionText;
	}

	public void setSurveyQuestionText(String surveyQuestionText) {
		this.surveyQuestionText = surveyQuestionText;
	}

	public List<SurveyAnswer> getSurveyAnswers() {
		return this.surveyAnswers;
	}

	public void setSurveyAnswers(List<SurveyAnswer> surveyAnswers) {
		this.surveyAnswers = surveyAnswers;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

}